import request from "@/utils/request";

// 管理员列表 /admin/manager/:page?limit=10&keyword=ceshi
export const getManagerList = (page: number, limit: number, keyword: string) => {
    return request({
        url: `/manager/${page}?limit=${limit}&keyword=${keyword}`,
        method: "get",
    });
};

// 修改状态
export const changStatus = (id: number, data: object) => {
    return request({
        url: `/manager/${id}/update_status`,
        method: "POST",
        data,
    });
};

// 添加内容

export const addManager = (data: object) => {
    return request({
        url: `/manager`,
        method: "POST",
        data,
    });
};
// 修改内容
export const editManager = (id: number, data: object) => {
    return request({
        url: `/manager/${id}`,
        method: "POST",
        data,
    });
};
// 删除
export const delManager = (id: number) => {
    return request({
        url: `/manager/${id}/delete`,
        method: "POST",
    });
};